import request from '@/utils/request'

// 查询HtTalent总数
export function talentCount(query) {
  return request({
    url: '/api/v1/ht-talent/count/',
    method: 'get',
    params: query
  })
}
// 查询HtTalent列表
export function listHtTalent(query) {
  return request({
    url: '/api/v1/ht-talent',
    method: 'get',
    params: query
  })
}
export function listHtTalentF(query) {
  return request({
    url: '/api/v1/ht-talent/f/',
    method: 'get',
    params: query
  })
}

// 查询HtTalent详细
export function getHtTalent(id) {
  return request({
    url: '/api/v1/ht-talent/' + id,
    method: 'get'
  })
}

// 新增HtTalent
export function addHtTalent(data) {
  return request({
    url: '/api/v1/ht-talent',
    method: 'post',
    data: data
  })
}

// 修改HtTalent
export function updateHtTalent(data) {
  return request({
    url: '/api/v1/ht-talent/' + data.id,
    method: 'put',
    data: data
  })
}

// 删除HtTalent
export function delHtTalent(data) {
  return request({
    url: '/api/v1/ht-talent',
    method: 'delete',
    data: data
  })
}
// 删除HtTalent
export function delHtTalentResume(data) {
  return request({
    url: '/api/v1/ht-talent/resume',
    method: 'delete',
    data: data
  })
}

// 上传简历
export function uploadResume(data, cfg) {
  return request({
    url: '/api/v1/ht-talent/uploadResume',
    method: 'post',
    data: data,
    config: {
      onUploadProgress: cfg.onUploadProgress
    }
  })
}
